package com.straw.hat.springboot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;

/**
 * @author jianshan@byai.com
 * @date 2020/12/10 3:19 PM
 * describe:
 */
@SpringBootApplication
public class StrawHatApplication{

    private static final Logger LOGGER = LoggerFactory.getLogger(StrawHatApplication.class);

    static class StrawHatApplicationContext extends AnnotationConfigServletWebServerApplicationContext {
        @Override
        protected void initPropertySources() {
            String property = this.getEnvironment().getProperty("application.custom.name");
            if (property == null) {
                LOGGER.error("property : [application.custom.name] value is null !");
            }
        }
    }
}
